/*
export const hasToken = ( state, text) => {	
	let collection = state.Collection;
	let i = _.findIndex(collection, { key: text });	
	if(i<=-1) {
		return false	
	}
	let indexValue = collection[i].value;
	let map = state.Group;
	return (map.indexOf(indexValue) > -1);	
}
*/

export const hasToken = ( state, text ) => {
	let collection = state.pageCollection;
	if(collection.hasOwnProperty(text)) {
		let value = collection[text];
		let map = state.Group;
		return (map.indexOf(value) > -1);			
	} else {
		//return false;
		return true
	}
}